package org.darkforest.model;

import org.darkforest.common.util.DateUtil;
import org.darkforest.common.util.Page;

public class Festival extends Page<Festival> {
    private Integer fId;

    private String fName;

    private String fDate;

    private Integer fType;

    private String fMark;

    private String createTime;

    private Integer createrId;

    private String createName;

    private String showFlag;

    private String dateInfo; //页面日期展示

    private String currateDate; //当前日期，查询条件

    public Festival(){}

    /**
     * 不分页查询
     * @param pageSwtich
     */
    public Festival(boolean pageSwtich){
        super.setPageSwitch(pageSwtich);
    }

    public Festival(String fName) {
        this.fName = fName;
    }


    public Integer getfId() {
        return fId;
    }

    public void setfId(Integer fId) {
        this.fId = fId;
    }

    public String getfName() {
        return fName;
    }

    public void setfName(String fName) {
        this.fName = fName == null ? null : fName.trim();
    }

    public String getfDate() {
        return fDate;
    }

    public void setfDate(String fDate) {
        this.fDate = fDate == null ? null : fDate.trim();
    }

    public Integer getfType() {
        return fType;
    }

    public void setfType(Integer fType) {
        this.fType = fType;
    }

    public String getfMark() {
        return fMark;
    }

    public void setfMark(String fMark) {
        this.fMark = fMark == null ? null : fMark.trim();
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime == null ? null : createTime.trim();
    }

    public Integer getCreaterId() {
        return createrId;
    }

    public void setCreaterId(Integer createrId) {
        this.createrId = createrId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName == null ? null : createName.trim();
    }

    public String getShowFlag() {
        return showFlag;
    }

    public void setShowFlag(String showFlag) {
        this.showFlag = showFlag;
    }

    public String getDateInfo() {
        if(this.fDate!=null){
            String dateinfo = DateUtil.dateToString(DateUtil.strToDate(this.fDate, DateUtil.DEFAULT_DATE_PATTERN), "MM月dd日");
            return dateinfo;
        }else{
            return "";
        }
    }

    public void setDateInfo(String dateInfo) {
        this.dateInfo = dateInfo;
    }

    public String getCurrateDate() {
        return currateDate;
    }

    public void setCurrateDate(String currateDate) {
        this.currateDate = currateDate;
    }
}